﻿using System;
using System.Collections.Generic;
using System.Text;
using TarreOA.TarreOADAL;
using TarreOA.TarreOAModels;
namespace TarreOA.TarreOABLL
{
   public class News
    {

       public Boolean insertNews(string newsTitle, string Detail, int issueUser, int sectionId, int outLineState)
        {
            NewsDAO news = new NewsDAO();
            return news.addNews(newsTitle, Detail,issueUser, sectionId,outLineState);
        }
       public TarreOAModels.News readNews(int id) {
           NewsDAO news = new NewsDAO();
           return news.showNews(id);
       }
       public Boolean updateNews(int id,string newsTitle, string Detail)
       {
           NewsDAO news = new NewsDAO();
           return news.updateNews(id,newsTitle, Detail);
       }
       public Boolean deleteNewsById(int id) {
           NewsDAO news = new NewsDAO();
           return news.deleteById(id);
       }
       public List<TarreOA.TarreOAModels.News> getNews(int id)
       {
           NewsDAO news = new NewsDAO();
           return news.getNews(id);
       }
    }
}
